#include "login.h"
#include "UserList.h"
#include "Chat.h"
#include <QtGui/QApplication>
#include <QtCore/QTextCodec>

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GB18030"));
	Login w;
    w.show();
	if(w.exec() == QDialog::Accepted){
        UserList usrList(0,0,w.getUserName(),w.getServerSocket());
        usrList.show();
		return a.exec();
	}
	else
		return 0;
}
